﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Chapter14.Code07.Code06.Example06
{
    public class Demo
    {
        public static void Begin()
        {
            string[] curries2 = { "pathia", "jalfrezi", "korma" };
            Console.WriteLine(curries2.Aggregate((a, b) => a + " " + b));
            Console.WriteLine(curries2.Aggregate<string, int>(0, (a, b) => a + b.Length));
            Console.WriteLine(curries2.Aggregate<string, string, string>("some curries2:", (a, b) => a + " " + b, a => a));
            Console.WriteLine(curries2.Aggregate<string, string, int>("Some cruuies2:", (a, b) => a + " " + b, a => a.Length));
            Console.ReadLine();
        }
    }
}
